import 'package:flutter/material.dart';

class MyKeepAlive extends StatefulWidget {
  Widget? child;
  MyKeepAlive({super.key, required this.child});

  @override
  State<MyKeepAlive> createState() => _MyKeepAliveState();
}

class _MyKeepAliveState extends State<MyKeepAlive> with AutomaticKeepAliveClientMixin {
  @override
  Widget build(BuildContext context) {
    return widget.child!;
  }
  
  @override
  bool get wantKeepAlive => true;
}
